﻿namespace Token.Module;

public interface ITModule
{
    /// <summary>
    /// 模块初始化
    /// 生命周期发生在自动注入之前
    /// </summary>
    /// <param name="options"></param>
    /// <returns></returns>
    Task InitializeAsync(ServiceConfigurationOptions options);
    
    /// <summary>
    /// 模块初始化
    /// 生命周期发生在自动注入之前
    /// </summary>
    /// <param name="options"></param>
    void Initialize(ServiceConfigurationOptions options);
    
    /// <summary>
    /// 模块配置
    /// 生命周期发生在自动注入之后
    /// </summary>
    /// <param name="options"></param>
    /// <returns></returns>
    Task ConfigureServicesAsync(ServiceConfigurationOptions options);

    /// <summary>
    /// 模块配置
    /// 生命周期发生在自动注入之后
    /// </summary>
    /// <param name="options"></param>
    void ConfigureServices(ServiceConfigurationOptions options);
}